#!/bin/bash
# file: /etc/ppp/ip-down

export PATH="/bin:/sbin:/usr/sbin:/usr/bin"

OLDGW=`netstat -I ppp0 | tail -2 | grep -v "<Link#" | awk '{print $4}'`

route delete 192.168.1.100 "${OLDGW}"
route delete 192.168.1.70 "${OLDGW}"
route delete 192.168.1.86 "${OLDGW}"
route delete 192.168.1.0/24 "${OLDGW}"
route delete 192.168.199.0/24 "${OLDGW}"
route delete 10.10.0.0/16 "${OLDGW}"
route delete 192.168.16.3 "${OLDGW}"
